package stockblaster.client.objectives;

import stockblaster.client.CurrentUser;

public class CompanyPageTabObjective extends Objective {
	/**
	 * Creates an objective with a given tab on the company page to reach.
	 * 
	 * @param description
	 *            The English description of the objective.
	 * @param screenNum
	 *            The number of the tab to reach.
	 */
	public CompanyPageTabObjective(String description, int sensitivity, int tabNum) {
		super(description, sensitivity);
		this.tabNum = tabNum;
	}

	/**
	 * Check whether the player is on the target company page tab.
	 * 
	 * @return Whether or not the player is on the target company page tab.
	 */
	public boolean check() {
		return this.tabNum == CurrentUser.getCurrentCompanyTab();
	}

	private int tabNum;
}